package org.bouscarlo.jj2000.decoding.service;

import android.os.RemoteException;

public class JJ2000DecodingServiceStub extends JJ2000DecodingService.Stub {

	private final JJ2000DecodingServiceImpl service;
	
	public JJ2000DecodingServiceStub(JJ2000DecodingServiceImpl service) {
		this.service = service;
	}
	
	@Override
	public JJ2000Bitmap decodeImage(byte[] jp2) throws RemoteException {
		try {
			return service.decodeImage(jp2);
		} catch (Exception e){
			throw new RemoteException();
		}
	}

}
